import pygame

GRID=(40,30)
SCREEN=(800,600)

RED=(255,0,0)
GREEN=(0,255,0)
QING=(0,255,255)
BLACK=(0,0,0)
WHITE=(255,255,255)

class BaseBox():
    def __init__(self,point,color):
        self.x=point[0]
        self.y=point[1]
        self.color=color

    @staticmethod
    def to_screenxy(gridx,gridy):
        return gridx*20,gridy*20

    def render(self,screen):
        sx,sy=BaseBox.to_screenxy(self.x,self.y)
        pygame.draw.rect(screen,self.color,(sx,sy,18,18))
